/**
 * 任务系统模块路由
 */

const taskRouter = {
    path: 'task',
    component: resolve => require(['@/views/task/index'], resolve),
    children: [
        {
            path: 'task-user-list',
            name: 'TaskUserList',
            component: resolve => require(['@/views/task/user-list'], resolve),
            meta: {
                authList: {
                    auth_page: ['__auto_by_action:student-student_user\\get_list'],
                    auth_school_edit: ['__auto_by_action:student-student_user\\change_school'],
                    auth_class_edit: ['__auto_by_action:student-student_user\\change_class'],
                    auth_status: ['__auto_by_action:student-student_user\\set_status'],
                    auth_sex: ['__auto_by_action:student-student_user\\set_sex']
                // auth_page: ['__auto_by_action:task-user\\user_list'],
                // auth_transform: ['__auto_by_action:task-user\\user_score_trans_money']
                },
                authResult: {}
            }
        },
        {
            path: 'agent-user-list',
            name: 'AgentUserList',
            component: resolve => require(['@/views/task/agent-user-list'], resolve),
            meta: {
                authList: {
                    auth_page: ['__auto_by_action:task-agent\\get_list'],
                },
                authResult: {}
            }
        },
        {
            path: 'academy-list',
            name: 'AcademyList',
            component: resolve => require(['@/views/task/academy-list'], resolve),
            meta: {
                authList: {
                // 浏览列表
                    auth_page: ['__auto_by_action:task-base_academy\\list'],
                    auth_transform: ['__auto_by_action:task-base_academy\\save', '__auto_by_action:task-base_academy\\delete', '__auto_by_action:task-base_academy\\create']
                },
                authResult: {}
            }
        },
        //班级管理
        {
            path: 'class-list',
            name: 'ClassList',
            component: resolve => require(['@/views/task/class-list'], resolve),
            meta: {
                authList: {
                // 浏览列表
                    auth_page: ['__auto_by_action:task-base_class\\get_list'],
                    auth_transform: ['__auto_by_action:task-base_class\\set_monitor', '__auto_by_action:task-base_class\edit', '__auto_by_action:task-base_class\set_status']
                },
                authResult: {}
            }
        },
        {
            path: 'add-academy',
            name: 'AddAcademy',
            component: resolve => require(['@/views/task/add-academy'], resolve),
            meta: {
                authList: {
                // 浏览列表
                    auth_page: [],
                    auth_transform: ['__auto_by_action:task-base_academy\\create']
                },
                authResult: {}
            }
        },
        {
            path: 'customer-service-set',
            name: 'CustomerServiceSet',
            component: resolve => require(['@/views/task/customer-service-set'], resolve),
            meta: {
                authList: {
                // 浏览列表
                    auth_page: [],
                    auth_transform: []
                },
                authResult: {}
            }
        },
        {
            path: 'precision-put',
            name: 'PrecisionPut',
            component: resolve => require(['@/views/task/precision-put'], resolve),
            meta: {
                authList: {
                // 浏览列表
                    auth_page: ['__auto_by_action:task-task\\get_select_class_list', '__auto_by_action:task-task\\get_not_select_class_list'],
                    auth_transform: ['__auto_by_action:task-task\\select_class', '__auto_by_action:task-task\\send_message_to_select_class', '__auto_by_action:task-task\\delete_select_class']
                },
                authResult: {}
            }
        },
        {
            path: 'add-class',
            name: 'AddClass',
            component: resolve => require(['@/views/task/add-class'], resolve),
            meta: {
                authList: {
                // 浏览列表
                    auth_page: [],
                    auth_transform: ['__auto_by_action:task-base_class\\mass_add']
                },
                authResult: {}
            }
        },
        {
            path: 'verify-class',
            name: 'VerifyClass',
            component: resolve => require(['@/views/task/verify-class'], resolve),
            meta: {
                authList: {
                // 浏览列表
                    auth_page: ['__auto_by_action:task-base_class_create_apply\\get_list'],
                    auth_edit: ['__auto_by_action:task-base_class_create_apply\\edit'],
                    auth_verify: ['__auto_by_action:task-base_class_create_apply\\verify'],
                },
                authResult: {}
            }
        },
        {
            path: 'lottery-list', //抽奖活动列表
            name: 'LotteryList',
            component: resolve => require(['@/views/task/lottery-list'], resolve),
            meta: {
                authList: {
                // 浏览列表
                    auth_page: ['__auto_by_action:task-lottery\\list'],
                    auth_edit: ['__auto_by_action:task-lottery\\save'], //编辑/新增
                    auth_delete: ['__auto_by_action:task-lottery\\delete'], //删除
                    auth_record_list: ['__auto_by_action:task-lottery_try_log\\list'], //中奖记录
                },
                authResult: {}
            }
        },
        {
            path: 'lottery-edit', //抽奖活动新增/编辑
            name: 'LotteryEdit',
            component: resolve => require(['@/views/task/lottery-edit'], resolve),
            meta: {
                authList: {
                // 浏览列表
                    auth_page: ['__auto_by_action:task-lottery\\get', '__auto_by_action:task-lottery\\save'],
                    auth_save: ['__auto_by_action:task-lottery\\save']
                },
                authResult: {}
            }
        },
        {
            path: 'lottery-record', //抽奖记录
            name: 'LotteryRecord',
            component: resolve => require(['@/views/task/lottery-record'], resolve),
            meta: {
                authList: {
                // 浏览列表
                    auth_page: ['__auto_by_action:task-lottery_try_log\\list'],
                },
                authResult: {}
            }
        },
        {
            path: 'task-list',
            name: 'TaskList',
            component: resolve => require(['@/views/task/task-list'], resolve),
            meta: {
                authList: {
                // 浏览列表
                    auth_page: ['__auto_by_action:task-user\\user_list'],
                    auth_add: ['__auto_by_action:task-task\\add'],
                    auth_edit: ['__auto_by_action:task-task\\edit'],
                    auth_delete: ['__auto_by_action:task-task\\delete'],
                    auth_agent: ['__auto_by_action:task-task_invite\\list'],
                    auth_audit: ['__auto_by_action:task-task_submit\\list']
                },
                authResult: {}
            }
        },
        {
            path: 'task-add',
            name: 'TaskAdd',
            component: resolve => require(['@/views/task/task-edit'], resolve),
            meta: {
                authList: {
                    auth_page: ['__auto_by_action:task-task\\add'],
                },
                authResult: {}
            }
        },
        {
            path: 'task-edit',
            name: 'TaskEdit',
            component: resolve => require(['@/views/task/task-edit'], resolve),
            meta: {
                authList: {
                    auth_page: ['__auto_by_action:task-task\\edit'],
                },
                authResult: {}
            }
        },
        {
            path: 'task-review-list',
            name: 'TaskReviewList',
            component: resolve => require(['@/views/task/task-review-list'], resolve),
            meta: {
                authList: {
                    auth_page: ['__auto_by_action:task-task_submit\\get'],
                    auth_export: ['__auto_by_action:task-task_submit\\export'],
                    auth_media: ['__auto_by_action:task-task_submit\\email'],
                    auth_agent: ['__auto_by_action:task-task_invite\\list'],
                    auth_audit: ['__auto_by_action:task-task_submit\\audit']
                },
                authResult: {}
            }
        },
        {
            path: 'task-review-list-for-agent',
            name: 'TaskReviewListForAgent',
            component: resolve => require(['@/views/task/task-review-list'], resolve),
            meta: {
                authList: {
                    auth_page: ['__auto_by_action:task-task_submit\\get'],
                    auth_export: ['__auto_by_action:task-task_submit\\export'],
                    auth_media: ['__auto_by_action:task-task_submit\\email'],
                    auth_agent: ['__auto_by_action:task-task_invite\\list'],
                    auth_audit: ['__auto_by_action:task-task_submit\\audit']
                },
                authResult: {}
            }
        },
        {
            path: 'task-agent-list',
            name: 'TaskAgentList',
            component: resolve => require(['@/views/task/task-agent-list'], resolve),
            meta: {
                authList: {
                    auth_page: ['__auto_by_action:task-task_invite\\list'],
                    auth_export: ['__auto_by_action:task-task_invite\\export'],
                    auth_audit: ['__auto_by_action:task-task_submit\\list']
                },
                authResult: {}
            }
        },
        {
            path: 'finance-list',
            name: 'FinanceList',
            component: resolve => require(['@/views/task/finance-list'], resolve),
            meta: {
                authList: {
                    auth_page: ['__auto_by_action:task-finance_user_order\\get_list'],
                    auth_export: ['__auto_by_action:task-finance_user_order\\export_list'],
                    auth_operate: ['__auto_by_action:task-finance_user_order\\set_status']
                },
                authResult: {}
            }
        },

    ]
};

export default taskRouter;
